package org.fududu.oauth2;

/**
 * Error response data model.
 *
 * @author Fuchun
 * @since 1.0
 */
public interface OAuth2Error {

    /**
     * The <strong>error</strong> parameter name.
     */
    String PARAM_ERROR = "error";

    /**
     * The <strong>error_description</strong> parameter name.
     */
    String PARAM_ERROR_DESCRIPTION = "error_description";

    /**
     * The <strong>error_uri</strong> parameter name.
     */
    String PARAM_ERROR_URI = "error_uri";

    /**
     * The <strong>state</strong> parameter name.
     */
    String PARAM_STATE = "state";

    /**
     * Return the oauth2.0 authorized error code.
     * <p>
     * <strong>REQUIRED</strong>. A single error code
     * </p>
     */
    String getError();

    /**
     * Return the oauth2.0 authorized error description.
     * <p>
     * <strong>OPTIONAL</strong>. A human-readable UTF-8 encoded text providing additional information,
     * used to assist the client developer in understanding the error that occurred.
     * </p>
     */
    String getErrorDescription();

    /**
     * Return the oauth2.0 authorized error URI.
     * <p>
     * <strong>OPTIONAL</strong>. A URI identifying a human-readable web page with information about the error,
     * used to provide the client developer with additional information about the error.
     * </p>
     */
    String getErrorUri();

    /**
     * Return the exact value received from the client.
     * <p>
     * <strong>REQUIRED</strong> if a valid "state" parameter was present in the client authorization request.
     * The exact value received from the client.
     * </p>
     */
    String getState();
}
